package es.us.isa.jdbl.domain;



import java.util.List;

import javax.persistence.Column;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.SecondaryTable;
import javax.persistence.SecondaryTables;



@Entity
@SecondaryTables({
	@SecondaryTable(name="content_type_patent", catalog = "webisa", pkJoinColumns={
			@PrimaryKeyJoinColumn(name="nid", referencedColumnName="nid")}),
	@SecondaryTable(name="content_field_startdate", catalog = "webisa", pkJoinColumns={
			@PrimaryKeyJoinColumn(name="nid", referencedColumnName="nid")}),
})

@DiscriminatorValue("patent")
public class Patent extends AbstractNode{

	@Column(name="field_patent_number_value", table="content_type_patent")
	private String patentNumber;
	//content_type_patent
	
	@Column(name="field_request_number_value", table="content_type_patent")
	private String requestNumber;
	//content_type_patent
	
	@Column(name="field_priority_country_value", table="content_type_patent")
	private String priorityCountry;
	//content_type_patent

	@Column(name="field_assignee_value", table="content_type_patent")
	private String assignee;
	//content_type_patent
	
	@Column(name="field_countries_value", table="content_type_patent")
	private String countries;
	//content_type_patent
	
	@Column(name="field_companies_value", table="content_type_patent")
	private String companiesExploiting;
	//content_type_patent
	
	@Column(name="field_ejemplofkeditor_value", table="content_type_patent")
	private String ejemploEditor;
	//content_type_patent
	
	@Column(name="field_patente_type_value", table="content_type_patent")
	private String typeOfPatent;
	
	@Column(name="field_startdate_value", table="content_field_startdate")
	private String priorityDate;
	//content_field_startdate
	
	@ManyToMany
	@JoinTable(name="content_field_projects", catalog = "webisa",
			joinColumns=@JoinColumn(name="nid"),
			inverseJoinColumns=@JoinColumn(name="field_projects_nid"))
	private List<Project> projects;
	
	@ManyToMany
	@JoinTable(name="content_field_user", catalog = "webisa",
			joinColumns=@JoinColumn(name="nid"),
			inverseJoinColumns=@JoinColumn(name="field_user_uid", referencedColumnName="uid"))
	private List<Member> researchStaff;	
	
	public String getPatentNumber() {
		return patentNumber;
	}

	public String getTypeOfPatent() {
		return typeOfPatent;
	}

	public void setTypeOfPatent(String typeOfPatent) {
		this.typeOfPatent = typeOfPatent;
	}

	public String getEjemploEditor() {
		return ejemploEditor;
	}

	public void setEjemploEditor(String ejemploEditor) {
		this.ejemploEditor = ejemploEditor;
	}

	public List<Project> getProjects() {
		return projects;
	}

	public void setProject(List<Project> projects) {
		this.projects = projects;
	}

	public String getPriorityDate() {
		return priorityDate;
	}

	public void setPriorityDate(String priorityDate) {
		this.priorityDate = priorityDate;
	}

	public String getAssignee() {
		return assignee;
	}

	public void setAssignee(String assignee) {
		this.assignee = assignee;
	}

	public String getCountries() {
		return countries;
	}

	public void setCountries(String countries) {
		this.countries = countries;
	}

	public String getCompaniesExploiting() {
		return companiesExploiting;
	}

	public void setCompaniesExploiting(String companiesExploiting) {
		this.companiesExploiting = companiesExploiting;
	}

	public void setPatentNumber(String patentNumber) {
		this.patentNumber = patentNumber;
	}

	public String getRequestNumber() {
		return requestNumber;
	}

	public void setRequestNumber(String requestNumber) {
		this.requestNumber = requestNumber;
	}

	public String getPriorityCountry() {
		return priorityCountry;
	}

	public void setPriorityCountry(String priorityCountry) {
		this.priorityCountry = priorityCountry;
	}

	public List<Member> getResearchStaff() {
		return researchStaff;
	}

	public void setResearchStaff(List<Member> researchStaff) {
		this.researchStaff = researchStaff;
	}
	
	
	
	
	
	
}
